package jp.co.hcs.attendancemanagement.inputtableb.actionform;

import java.util.ArrayList;
import java.util.List;

import jp.co.hcs.attendancemanagement.inputtableb.logic.dto.ProjectEffortInfoDTO;

import org.apache.struts.action.ActionForm;

/**
 * The Class InputTableBForm.
 */
public class InputTableBForm extends ActionForm {

  /** The Constant serialVersionUID. */
  private static final long serialVersionUID = 1L;

  /** The b show delete. */
  private boolean bShowDelete = true;

  /** The b show add. */
  private boolean bShowAdd;

  /** The b changed. */
  private boolean bChanged;

  /** The day number of month. */
  private int dayNumberOfMonth;

  /** The input year. */
  private String inputYear;

  /** The input month. */
  private String inputMonth;

  /** The actual effort year month. */
  private String actualEffortYearMonth;

  /** The old actual effort year month. */
  private String oldActualEffortYearMonth;

  /** The day name array. */
  private String[] dayNameArray;

  /** The employer code. */
  private String employerCode;

  /** The employer name. */
  private String employerName;

  /** The division name. */
  private String divisionName;

  /** The department name. */
  private String departmentName;

  /** The select period. */
  private String selectPeriod;

  /** The select. */
  private Boolean select;

  /** The project effort info dto list. */
  private List<ProjectEffortInfoDTO> projectEffortInfoDTOList =
      new ArrayList<ProjectEffortInfoDTO>();

  /** The disable days list. */
  private List<Boolean> disableDaysList = new ArrayList<Boolean>();

  /** The holiday ex line list. */
  private List<Boolean> holidayExLineList = new ArrayList<Boolean>();

  /**
   * Reset input form data.
   */

  public void resetInputFormData() {
    bShowAdd = false;
    bShowDelete = true;
    bChanged = false;
    dayNumberOfMonth = 0;
    inputYear = null;
    inputMonth = null;
    actualEffortYearMonth = null;
    oldActualEffortYearMonth = null;
    dayNameArray = null;
    employerCode = null;
    employerName = null;
    divisionName = null;
    departmentName = null;
    selectPeriod = null;
    select = false;
    projectEffortInfoDTOList = new ArrayList<ProjectEffortInfoDTO>();
    disableDaysList = new ArrayList<Boolean>();
    holidayExLineList = new ArrayList<Boolean>();
  }

  /**
   * Instantiates a new input table b form.
   */
  public InputTableBForm() {
    super();
  }

  /**
   * Gets the employer code.
   * 
   * @return the employer code
   */
  public String getEmployerCode() {
    return employerCode;
  }

  /**
   * Sets the employer code.
   * 
   * @param employerCode the new employer code
   */
  public void setEmployerCode(String employerCode) {
    this.employerCode = employerCode;
  }

  /**
   * Gets the employer name.
   * 
   * @return the employer name
   */
  public String getEmployerName() {
    return employerName;
  }

  /**
   * Sets the employer name.
   * 
   * @param employerName the new employer name
   */
  public void setEmployerName(String employerName) {
    this.employerName = employerName;
  }

  /**
   * Gets the division name.
   * 
   * @return the division name
   */
  public String getDivisionName() {
    return divisionName;
  }

  /**
   * Sets the division name.
   * 
   * @param divisionName the new division name
   */
  public void setDivisionName(String divisionName) {
    this.divisionName = divisionName;
  }

  /**
   * Gets the department name.
   * 
   * @return the department name
   */
  public String getDepartmentName() {
    return departmentName;
  }

  /**
   * Sets the department name.
   * 
   * @param departmentName the new department name
   */
  public void setDepartmentName(String departmentName) {
    this.departmentName = departmentName;
  }

  /**
   * Gets the select period.
   * 
   * @return the select period
   */
  public String getSelectPeriod() {
    return selectPeriod;
  }

  /**
   * Sets the select period.
   * 
   * @param selectPeriod the new select period
   */
  public void setSelectPeriod(String selectPeriod) {
    this.selectPeriod = selectPeriod;
  }

  /**
   * Gets the project effort info dto list.
   * 
   * @return the project effort info dto list
   */
  public List<ProjectEffortInfoDTO> getProjectEffortInfoDTOList() {
    return projectEffortInfoDTOList;
  }

  /**
   * Sets the project effort info dto list.
   * 
   * @param projectEffortInfoDTOList the new project effort info dto list
   */
  public void setProjectEffortInfoDTOList(List<ProjectEffortInfoDTO> projectEffortInfoDTOList) {
    this.projectEffortInfoDTOList = projectEffortInfoDTOList;
  }

  /**
   * Gets the select.
   * 
   * @return the select
   */
  public Boolean getSelect() {
    return select;
  }

  /**
   * Sets the select.
   * 
   * @param select the new select
   */
  public void setSelect(Boolean select) {
    this.select = select;
  }

  /**
   * Sets the project effort info dto list obj.
   * 
   * @param index the index
   * @param projectEffortInfoDTOListObj the project effort info dto list obj
   */
  public void setProjectEffortInfoDTOListObj(int index,
      ProjectEffortInfoDTO projectEffortInfoDTOListObj) {
    projectEffortInfoDTOList.set(index, projectEffortInfoDTOListObj);
  }

  /**
   * Gets the project effort info dto list obj.
   * 
   * @param i the i
   * @return the project effort info dto list obj
   */
  public ProjectEffortInfoDTO getProjectEffortInfoDTOListObj(int i) {
    int listObjSize = projectEffortInfoDTOList.size();
    // check if object exists at specified index
    if ((i + 1) > listObjSize) {
      // add objects
      for (int j = listObjSize; j < i + 1; j++) {
        ProjectEffortInfoDTO beanObj = new ProjectEffortInfoDTO();
        projectEffortInfoDTOList.add(j, beanObj);
      }
    }
    // get and return object at this index
    return (ProjectEffortInfoDTO) projectEffortInfoDTOList.get(i);
  }

  /**
   * Checks if is b changed.
   * 
   * @return true, if is b changed
   */
  public boolean isbChanged() {
    return bChanged;
  }

  /**
   * Sets the b changed.
   * 
   * @param bChanged the new b changed
   */
  public void setbChanged(boolean bChanged) {
    this.bChanged = bChanged;
  }

  /**
   * Gets the day number of month.
   * 
   * @return the day number of month
   */
  public int getDayNumberOfMonth() {
    return dayNumberOfMonth;
  }

  /**
   * Sets the day number of month.
   * 
   * @param dayNumberOfMonth the new day number of month
   */
  public void setDayNumberOfMonth(int dayNumberOfMonth) {
    this.dayNumberOfMonth = dayNumberOfMonth;
  }

  /**
   * Gets the input month.
   * 
   * @return the input month
   */
  public String getInputMonth() {
    return inputMonth;
  }

  /**
   * Sets the input month.
   * 
   * @param inputMonth the new input month
   */
  public void setInputMonth(String inputMonth) {
    this.inputMonth = inputMonth;
  }

  /**
   * Gets the day name array.
   * 
   * @return the day name array
   */
  public String[] getDayNameArray() {
    return dayNameArray;
  }

  /**
   * Sets the day name array.
   * 
   * @param dayNameArray the new day name array
   */
  public void setDayNameArray(String[] dayNameArray) {
    this.dayNameArray = dayNameArray;
  }

  /**
   * Gets the day name array.
   * 
   * @param index the index
   * @return the day name array
   */
  public String getDayNameArray(int index) {
    return dayNameArray[index];
  }

  /**
   * Sets the day name array.
   * 
   * @param index the index
   * @param dayName the day name
   */
  public void setDayNameArray(int index, String dayName) {
    dayNameArray[index] = dayName;
  }

  /**
   * Gets the input year.
   * 
   * @return the input year
   */
  public String getInputYear() {
    return inputYear;
  }

  /**
   * Sets the input year.
   * 
   * @param inputYear the new input year
   */
  public void setInputYear(String inputYear) {
    this.inputYear = inputYear;
  }

  /**
   * Gets the actual effort year month.
   * 
   * @return the actual effort year month
   */
  public String getActualEffortYearMonth() {
    return actualEffortYearMonth;
  }

  /**
   * Sets the actual effort year month.
   * 
   * @param actualEffortYearMonth the new actual effort year month
   */
  public void setActualEffortYearMonth(String actualEffortYearMonth) {
    this.actualEffortYearMonth = actualEffortYearMonth;
  }

  /**
   * Checks if is b show delete.
   * 
   * @return true, if is b show delete
   */
  public boolean isbShowDelete() {
    return bShowDelete;
  }

  /**
   * Sets the b show delete.
   * 
   * @param bShowDelete the new b show delete
   */
  public void setbShowDelete(boolean bShowDelete) {
    this.bShowDelete = bShowDelete;
  }

  /**
   * Gets the disable days list.
   * 
   * @return the disable days list
   */
  public List<Boolean> getDisableDaysList() {
    return disableDaysList;
  }

  /**
   * Sets the disable days list.
   * 
   * @param disableDaysList the new disable days list
   */
  public void setDisableDaysList(List<Boolean> disableDaysList) {
    this.disableDaysList = disableDaysList;
  }

  /**
   * Gets the holiday ex line list.
   * 
   * @return the holiday ex line list
   */
  public List<Boolean> getHolidayExLineList() {
    return holidayExLineList;
  }

  /**
   * Sets the holiday ex line list.
   * 
   * @param holidayExLineList the new holiday ex line list
   */
  public void setHolidayExLineList(List<Boolean> holidayExLineList) {
    this.holidayExLineList = holidayExLineList;
  }

  /**
   * Sets the disable days list.
   * 
   * @param index the index
   * @param bDisable the b disable
   */
  public void setDisableDaysList(int index, Boolean bDisable) {
    disableDaysList.set(index, bDisable);
  }

  /**
   * Gets the disable days list.
   * 
   * @param index the index
   * @return the disable days list
   */
  public Boolean getDisableDaysList(int index) {
    return disableDaysList.get(index);
  }

  /**
   * Sets the holiday ex line list.
   * 
   * @param index the index
   * @param bHoliday the b holiday
   */
  public void setHolidayExLineList(int index, Boolean bHoliday) {
    holidayExLineList.set(index, bHoliday);
  }

  /**
   * Gets the holiday ex line list.
   * 
   * @param index the index
   * @return the holiday ex line list
   */
  public Boolean getHolidayExLineList(int index) {
    return holidayExLineList.get(index);
  }

  /**
   * Gets the old actual effort year month.
   * 
   * @return the old actual effort year month
   */
  public String getOldActualEffortYearMonth() {
    return oldActualEffortYearMonth;
  }

  /**
   * Sets the old actual effort year month.
   * 
   * @param oldActualEffortYearMonth the new old actual effort year month
   */
  public void setOldActualEffortYearMonth(String oldActualEffortYearMonth) {
    this.oldActualEffortYearMonth = oldActualEffortYearMonth;
  }

  /**
   * Checks if is b show add.
   * 
   * @return true, if is b show add
   */
  public boolean isbShowAdd() {
    return bShowAdd;
  }

  /**
   * Sets the b show add.
   * 
   * @param bShowAdd the new b show add
   */
  public void setbShowAdd(boolean bShowAdd) {
    this.bShowAdd = bShowAdd;
  }

}
